package strategy;

import java.util.concurrent.ConcurrentHashMap;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class PayStrategyContext {
	
	private static final Logger LOGGER = LoggerFactory.getLogger(PayStrategyContext.class);
	 /**
     * 策略
     * KEY为业务编码
     * VALUE为具体实现类
     */
    private static final ConcurrentHashMap<String, PayStrategyService> strategy = new ConcurrentHashMap<>();

    
    public static void put(String name,PayStrategyService service) {
		strategy.put(name, service);
	}

	public static PayStrategyService get(String name) {
		return strategy.get(name);
	}
	
	
    
    
}
